package com.realtyManage.springboot.Service.authImpl;

import com.realtyManage.springboot.Dao.AuthUserRepository;
import com.realtyManage.springboot.Model.Do.AuthUser;
import com.realtyManage.springboot.Service.IAuthUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;
import java.util.Optional;

@Service
@Transactional
public class AuthUserServiceImpl implements IAuthUserService {
    @Autowired
    private AuthUserRepository authUserRepository;
    @Override
    public List<AuthUser> findAll() {
        return authUserRepository.findAll();
    }

    @Override
    public Optional<AuthUser> findById(Integer uid) {
        return authUserRepository.findById(uid);
    }

    @Override
    public void insert(AuthUser authUser) {
        AuthUser rs = authUserRepository.save(authUser);
    }

    @Override
    public void updateTokenByUid(Integer uid, String token) {

    }

}
